package cc.comac.mom.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import cc.comac.mom.entity.QualityFrrFormEntity;
import cc.comac.mom.entity.QualityQarCheckInvoiceEntity;
import cc.comac.mom.entity.QualityQarFrrRelationEntity;

@FeignClient(name = "mom-qar-srv")
public interface QualityFrrFormService {
	
	/**
	 * 当用户在FRR中处理完让步接收（具体在哪一个流程节点？）的零件后，
	 * 需要通过该接口将让步的零件信息发送给QAR，QAR在系统中进行零件标记提醒检验人员
	 * 
	 * **/
	@RequestMapping(value = "/QualityFrrFormService/reciveFrrPartData",method = RequestMethod.POST)
	public String reciveFrrPartData(@RequestBody QualityFrrFormEntity qualityFrrFormEntity);
	
	/**
	 * FRR系统接收QAR发送的信息进行FRR任务的开立，
	 * 并将FRR编号对应QAR编号进行回传
	 * **/
	@RequestMapping(value = "/QualityFrrFormService/openFrr",method = RequestMethod.POST)
	public String openFrr(@RequestBody QualityQarFrrRelationEntity QualityQarFrrRelationEntity);
	
	/**
	 * 当由QAR触发生成的FRR归档或作废后，
	 * FRR将该状态信息发送给QAR系统
	 * **/
	@RequestMapping(value = "/QualityFrrFormService/frrToFileOrScrap",method = RequestMethod.POST)
	public String frrToFileOrScrap(@RequestBody QualityQarFrrRelationEntity QualityQarFrrRelationEntity);
	
	@RequestMapping(value = "/QualityFrrFormService/sentQarDataToFrr",method = RequestMethod.POST)
	public String sentQarDataToFrr(@RequestBody QualityQarCheckInvoiceEntity qualityQarCheckInvoiceEntity);
	
}
